### default flow: session not save, shell quit, si enable, pba disable.
si = 1
pba = 0
quit = 1
session = 1
sdf = 1
power = 1

PT_EXEC = /opt/EDA/Synopsys/PT_2016/bin/pt_shell
#PT_EXEC = /opt/EDA/Synopsys/PT_2016/bin/pt_shell -multi

OPTIONS = -x "set corner $@ ; set SESSION_SAVE ${session} ; set SHELL_QUIT ${quit} ; set SI_ENABLE ${si} ; set METHOD sta ; set PBA_ENABLE ${pba} ; set SDF ${sdf} ; set POWER ${power} "
OPTIONS_DMSA = -x "set SESSION_SAVE ${session} ; set SHELL_QUIT ${quit} ; set SI_ENABLE ${si} ; set METHOD dmsa ; set PBA_ENABLE ${pba} ; set POWER ${power} "

###
shell: 
		$(PT_EXEC) | tee logs/shell.log

wc_cmax:
		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log

wc_cmin:
		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log

#lt_cmax:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log
#
#lt_cmin:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log
#
#wc_rcmax:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log
#
#wc_rcmin:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log
#
#lt_rcmax:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log
#
#lt_rcmin:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log

bc_cmax:
		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log

bc_cmin:
		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log

#bc_rcmax:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log
#
#bc_rcmin:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log
#
#ml_cmin:
#		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log

tc_25:
		$(PT_EXEC) $(OPTIONS) -f scripts/run_pt.tcl | tee logs/run_pt.$@.log

dmsa:
		$(PT_EXEC) $(OPTIONS_DMSA) -multi_scenario -f scripts/run_dmsa.tcl | tee logs/run_pt.$@.log

clean:
		rm -rf logs/* session reports *.log fsdb* DMSA

